package com.lin.missyou.repository;

import com.lin.missyou.model.Spu;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author gcq
 * @Create 2021-10-14
 */
public interface SpuRepository extends JpaRepository<Spu, Long> {
    Spu findOneById(Long id);
    Page<Spu> findByCategoryIdOrderByCreateTimeDesc(Long id, Pageable pageable);
    Page<Spu> findByRootCategoryIdOrderByCreateTimeDesc(Long id, Pageable pageable);
}
